<%--
  Created by IntelliJ IDEA.
  User: 
  Date: 2022/4/4
  Time: 22:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui.form小例子</title>
    <!-- 引入 layui.css -->
    <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css"/>
</head>
<style>
    #app {
        width: 600px;
        height: auto;
        margin-left: 350px;
    }

    body {
        background-image: url("https://images.pexels.com/photos/2907031/pexels-photo-2907031.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500");
    }
</style>
<body>

<div id="app">
    <h1 align="center">添加学生信息</h1>
    <br>
    <form class="layui-form" action="${pageContext.request.contextPath}/insertStudentServlet" method="post"> <!-- 提示：如果你不想用form，你可以换成div等任何一个普通元素 -->

        <div class="layui-form-item">
            <label class="layui-form-label">学生学号</label>
            <div class="layui-input-block">
                <input type="text" name="studentNum" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-block">
                <input type="text" name="studentName" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机号码</label>
            <div class="layui-input-block">
                <input type="text" name="studentPhone" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">入住信息</label>
            <div class="layui-input-block">
                <select name="studentIsin" lay-filter="aihao">
                    <option value="0">已入住</option>
                    <option value="1">未入住</option>
                    <option value="2">已迁出</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-block">
                <input type="radio" name="studentSex" value="0" title="男">
                <input type="radio" name="studentSex" value="1" title="女" checked>
            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">楼宇信息</label>
            <div class="layui-input-block">
                <input type="text" name="studentBuild" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" name="studentInfo" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>

    </form>
</div>

<script src="//unpkg.com/layui@2.6.8/dist/layui.js"/>
<script>
    layui.use('form', function () {
        var form = layui.form;

        //各种基于事件的操作，下面会有进一步介绍
    });
</script>
</body>
</html>